<!doctype html>
<html>
<head>
    <script src="/blue/js/jquery.js"></script>
    <link href="/blue/css/css.css" rel="stylesheet" type="text/css">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="format-detection" content="telephone=no" />
    <title>蓝色家政个人中心</title>
    <style>
        .right{ height:100%; width:100%; background-color:#f9f9f9; position:absolute;top:0; right:0;}
        /*头像、点击登录*/
        .login{ height:128px; background-color:#01aff0; position:relative}
        .login > img{ width:9px; height:auto; position:absolute; left:5%; top:15px;}
        .login_photo{ width:48px; height:48px; background-color:#fff; float:left; margin-left:5%; margin-top:55px; border-radius:50%; overflow:hidden;}
        .login_photo img{ width:48px; height:48px;}
        .login p{ float:left; line-height:48px; margin-top:55px; font-size:16px;color:#fff; margin-left:13px;}
        /*菜单栏*/
        .column{ height:46px; position:relative; background:#fff;}
        .col_img{ width:18px; height:18px; float:left; margin-left:5%; margin-top:14px;}
        .col_img img{ width:18px; height:18px;}
        .column p{ line-height:46px; float:left; color:#191919; font-size:16px; margin-left:14px;}
        .amount{ width:8px; height:8px; position:absolute; left:5%; top:11px; background-color:#c40000; border-radius:50%; margin-left:15px;}
        /*选择头像*/
        .photo_box{ width:100%; height:138px; background-color:#fff; position:fixed; left:0; bottom:0;}
        .photo{ height:46px; line-height:46px; text-align:center; position:relative}
        /*底部导航*/
        .nav_box{ width:100%; height:51px; position:fixed; left:0; bottom:0; background-color:#fff;}
        .nav_index,.nav_order,.nav_my{ width:33.3%; float:left;}
        .nav_box img{ width:18px; height:auto; position:relative; left:50%; margin-left:-9px; margin-top:8px;}
        .nav_box h1{ font-size:12px; text-align:center; color:#65646b; line-height:25px;}
        .nav_box .current_nav{ color:#01aff0;}

    </style>

</head>

<body style="background-color: #f9f9f9;">
<div class="right">
    <!--头像、点击登录-->
    <div class="login">
        <img src="/blue/images/return1.png" onClick="window.history.go(-1)">
        <div class="login_photo" ><img src="/blue/images/touxiang2.png"></div>
        <p>个人中心</p>
        <?php if(session('name')!=""){?>
        <div style="margin-right: 10px;padding-bottom: 10px;"><p style="float: right;color:beige;font-size: 13px;" ><span style="color: #fff;">用户名:</span><?php echo session('name')?></p></div>
        <?php }else{ ?>
        <p style="float: right;"><a href="/index/login" style="font-size: 13px;padding-right: 20px;color: #fff">登录</a></p>
        <?php } ?>
        <div class="border_bottom"></div>
    </div>
    <div class="column" id="jinqian">
        <div class="col_img"><img src="/blue/images/wallet.png"></div>
        <p>我的钱包</p>
        <div class="border_bottom"></div>
    </div>
    <div class="column"
         @if(session('name'))
         onclick="document.location='member_center';"
         @else
         onclick="d()";
         @endif
         >
        <div class="col_img"><img src="/blue/images/people.png"></div>
        <p>会员中心</p>
        <div class="border_bottom"></div>
    </div>
    <div class="column" onclick="d()">
        <div class="col_img"><img src="/blue/images/order_3.png"></div>
        <p>我的订单</p>
        <div class="border_bottom"></div>
    </div>
    <div class="margin"></div>    
        <div class="column"
             @if(session('name'))
             onclick="document.location='news';"
             @else
             onclick="d()";
             @endif
             >
        <div class="col_img"><img src="/blue/images/message.png"></div>
        <p>消息中心</p>
        <div class="amount"></div>
        <div class="border_bottom"></div>
        <div class="border_top"></div>
    </div>  
    <div class="column"
         @if(session('name'))
         onclick="document.location='address';"
         @else
         onclick="d()";
         @endif
         >
        <div class="col_img"><img src="/blue/images/adrress.png"></div>
        <p>地址管理</p>
        <div class="border_bottom"></div>
    </div>
    <div class="margin"></div>
    <div class="column"
         @if(session('name'))
         onclick="document.location='share';"
         @else
         onclick="d()";
         @endif
         >
        <div class="col_img"><img src="/blue/images/share.png"></div>
        <p>邀请分享</p>
        <div class="border_bottom"></div>
        <div class="border_top"></div>
    </div>
    <?php if(session('name') != ""){?>
    <div class="margin"></div>
    <div class="column" class="login_out">
        <div class="col_img"><img src="/blue/images/tui.png"></div>
        <p><a href="" style="padding-right: 20px;color: #000;" id="login_out">退出登录</a></p>
        <div class="border_bottom"></div>
        <div class="border_top"></div>
    </div>
    <?php } ?>
</div>
<!--底部导航-->
<div class="nav_box">
    <div class="border_top"></div>
    <div class="nav_index chenge" onclick="document.location='/';">
        <img src="/blue/images/index_gray.png">
        <h1 style="">首页</h1>
    </div>
    <div class="nav_order chenge" onclick="d()" >
        <img src="/blue/images/order_gray.png">
        <h1>订单</h1>
    </div>
    <div class="nav_my chenge" onclick="document.location='index_center';" >
        <img src="/blue/images/my_blue.png">
        <h1 style=" color:#01AFF0">我的</h1>
    </div>
</div>
</body>
</html>
<script src="/layui/lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script>
    layui.use(['form','jquery'], function () {
        var $=layui.jquery
        $('#login_out').click(function(){
            $.get("/index/login_out",function(res){
            })
        });

    });

    $('#jinqian').click(function () {
        if("<?php echo session('name')?>" != ''){
            location.href = 'my_money';
        }else{
            alert('请先登录');
        }
    });
    //订单
    function d(){
        @if(session('name'))
            location.href='myorder'
        @else
        alert('请你先登录好吗谢谢');
        @endif
    }
</script>
